# !/usr/bin/env python3
# -*- coding: utf-8 -*-

'脚本入口'

__author__ = 'Hunter cheng'

import os
import sys

if os.path.dirname(__file__) in sys.path:
    pass
else:
    sys.path.append(os.path.dirname(__file__))

try:
    from root import AxialRoot, LateralRoot
    from trunk import Vessel
    from crown.branch import Bough
    from crown import fruit
except IOError:
    print('Error: The imported packages are inexistent')


def main() -> None:
    lateral_root = LateralRoot()
    axial_root = AxialRoot(lateral_root.data_path)
    data = axial_root.data_origin
    # print(data)

    vessel = Vessel(data)
    data = vessel.data_raw
    # print(data)

    bough = Bough(data)
    data = bough.templates
    # print(data)

    fruit(*data)


if __name__ == '__main__':
    main()
    print('Complete')
